package cn.demos.controller;

import cn.demos.pojo.Classes;
import cn.demos.pojo.Faqs;
import cn.demos.service.impl.ClassesServiceImpl;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;
import java.util.List;

@Controller
public class ClassesController {

    @Resource
    private ClassesServiceImpl classesService;

    @RequestMapping("/toadd.do")
    public String toadd(Model model){
        List<Classes> clist = classesService.cList();
        model.addAttribute("clist",clist);
        return  "add.jsp";
    }



}
